﻿/*
 * config_compiler.h
 *
 *  Created on: 2014年10月10日
 *      Author: Fifi Lyu
 */

// 会被多个文件同时包含，不需要定义头文件宏
//#ifndef INCLUDE_ZPSOE_CONFIG_COMPILER_H
//#define INCLUDE_ZPSOE_CONFIG_COMPILER_H

#ifdef ZPSOE_STATICLIB
    #define ZPSOE_SHARED_LIB_API
#endif

#ifdef _MSC_VER
    #if !defined(ZPSOE_SHARED_LIB_API) 
        #if defined(ZPSOE_SHAREDLIB)
            // If we are building the DLL, export the symbols tagged like this
            #define ZPSOE_SHARED_LIB_API __declspec(dllexport)
        #else
            // If we are consuming the DLL, import the symbols tagged like this
            #define ZPSOE_SHARED_LIB_API __declspec(dllimport)
        #endif
    #endif
#elif defined(__GNUC__)
    #if !defined(ZPSOE_SHARED_LIB_API) 
        #if defined(ZPSOE_SHAREDLIB)
            #define ZPSOE_SHARED_LIB_API __attribute__ ((visibility ("default")))
        #else
            // If you use -fvisibility=hidden in GCC, exception handling and RTTI
            // would break if visibility wasn't set during export _and_ import
            // because GCC would immediately forget all type infos encountered.
            // See http://gcc.gnu.org/wiki/Visibility
            #define ZPSOE_SHARED_LIB_API __attribute__ ((visibility ("default")))
        #endif
    #endif
#else
    #error Unknown compiler
#endif

//#endif // INCLUDE_ZPSOE_CONFIG_COMPILER_H
